package com.example.experience.dao;

import com.example.experience.domain.person;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface personMapper {

    List<person> findAll();

    @Insert("insert into person values (#{id},#{name});")
    void insertPerson(person person);

    @Delete("delete from person where id = #{id}")
    void deletePerson(int id);

    @Update("update person set id=#{id},name=#{name} where id=#{id}")
    void changePerson(person person);

    @Select("select * from person order by id LIMIT #{num},2")
    List<person> pageSelect(int num);
}
